<?php

/**
 * IndexController - The default controller class
 * 
 * @author
 * @version 
 */

require_once 'Zend/Controller/Action.php';

class CommentsController extends App_Zend_Controller_Action_Shop 
{
	


    public function indexAction() 
    {
    	$this->view->styleName = 'comments';
    	$page=$this->_request->getParam('page',1);	
       	$this->view->styleName = 'bulletin';
       	$suggestionModel=new CSuggestion();
    	Zend_Loader::loadClass("CFilter");
    	$itemCounts=$suggestionModel->getAllCounts();
    	$pageArray = CFilter::filterPage ( $page, $itemCounts, 20 );
    	$itemArray=$suggestionModel->getAll(20, $pageArray['from']);
		Zend_Loader::loadClass("CPage");
    	$pageString = CPage::divPages( $pageArray ['pageNumber'], $pageArray ['page'], ROOT_PATH."/comments-index"); //生成分页字符串
    	$this->view->assign ( "pageString", $pageString );
    	$this->view->assign ( "pageArray", $pageArray );
    	$this->view->assign ( "itemArray", $itemArray );
    	
    	$this->view->webSiteTitle = 'fancycheapjersey\'s reviews. The People\'s comment box.';
    	$this->view->webSiteKeywords = 'fancycheapjersey review, fancycheapjersey reviews, fancycheapjersey inc reviews, Comments';
    	$this->view->webSiteDescription = 'The People who shopped for soccer jersey on fancycheapjersey left comments here.';
		
    }
	
	public function postAction(){
	
		//$this->_helper->viewRenderer->setNoRender();
		
		//$this->getHelper ('layout')->disableLayout ();
	
	}


}
